/*
 * Created by SharpDevelop.
 * User: Administrator
 * Date: 20-03-2009
 * Time: 11:54
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Collections.Generic;

namespace Plain.Events{
	/// <summary>
	/// 
	/// Description of EventExtensions.
	/// </summary>
	public class EventExtensions{
        private static IDictionary<Type, object> dic = new Dictionary<Type,object>();
		public delegate void  EventHandler<T>(T t);
			public static void NotifyMe<T>(EventHandler<T> handler, When when){
                dic.Add(typeof(T), handler);
            }
            
		//public EventExtensions(){
		//}
	}
    public enum When { 
        Validate = 0x01,
        AfterValidate = 0x02,
        Save = 0x4,
        AfterSave = 0x08,
        Load = 0x10
    }
}
